<%@ page import="pojo.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>首页</title>
    <link type="text/css" rel="stylesheet" href="../skin/css/table.css"/>
    <script type="text/javascript" src="../skin/js/jquery-1.7.1.js"></script>
    <script type="text/javascript" src="../skin/js/del.js"></script>
    <script >
        $(function () {
            $("#logFamily").val("${logFamily}");
            $("#logStatus").val("${logStatus}");

            if(${result>0}){
                alert("更新成功")
            }
            if(${deleteResult>0}){
                alert("删除成功")
            }
            $("td").each(function () {
                if($(this).text()=="审核未通过") {
                    $(this).css("color", "#ff2d2d");
                }else if($(this).text()=="审核通过"){
                    $(this).css("color", "#00db00");
                }else if($(this).text()=="正在上报"){
                    $(this).css("color", "#aaaaff");
                }
            });
        });
    </script>
</head>

<body>
<%@include file="../functionModule.jsp"%>
<!--right-->
<div class="right_layout">
    <img src="../skin/images/left_hidden1_03.png" class="hidden_img"/>
    <div class="right_content">

        <div class="right_tit">
            <div class="right_back fyh"><a href="${pageContext.request.contextPath}/home?method=home">返回</a></div>
            <div class="tit_bg fyh">当前位置： 管理菜单 >>管理日志</div>
        </div>
        <div class="tabel_choose">
            <form action="${pageContext.request.contextPath}employee?method=selectCondition" method="post">
                <label class="table_lab fyh">类型查询</label>
            <select id="logFamily" name="logFamily" class="table_select2">
                <option value="" >请选择</option>
                <c:forEach items="${logFamilies}" var="logFamily" varStatus="vs">
                    <option>${logFamily.logFamily}</option>
                </c:forEach>
            </select>
            <label class="table_lab fyh">状态查询</label>
            <select id="logStatus" name="logStatus" class="table_select2">
                <option value="" class="">请选择</option>
                <option value="正在上报">正在上报</option>
                <option value="审核通过">审核通过</option>
                <option value="审核未通过">审核未通过</option>
            </select>
            <input type="submit" value="" class="table_bt1"/><input type="submit" class="table_bt fyh" value="查&nbsp;&nbsp;询"/><input type="submit" value="" class="table_bt2"/>
            </form>
        </div>
        <div>
            <table class="tab">
                <tr>
                    <th width="10%" class="tab_th fyh"><input type="checkbox" class="tab_checkbox1"/>ID</th>
                    <th width="20%" class="tab_th fyh">标题</th>
                    <th width="10%" class="tab_th fyh">日期</th>
                    <th width="15%" class="tab_th fyh">类型</th>
                    <th width="10%" class="tab_th fyh">状态</th>
                    <th width="10%" class="tab_th fyh">查看</th>
                    <th width="15%" class="tab_th fyh">管理</th>
                </tr>
                <c:forEach items="${logs1}" var="log" varStatus="vs">
                <tr>
                    <td class="tab_td fyh"><input type="checkbox" class="tab_checkbox"/><span class="tab_span">${log.id}</span></td>
                    <td class="tab_td fyh">${log.title}</td>
                    <td class="tab_td fyh">${log.date}</td>
                    <td class="tab_td fyh">${log.logFamily}</td>
                    <td id="status"  class="tab_td fyh">${log.logStatus}</td>
                    <td class="tab_td fyh"><a href="${pageContext.request.contextPath}employee?method=lookLog&id=${log.id}"><input type="button" class="tab_button" value="查看"/></a></td>
                    <td class="tab_td fyh"><a href="${pageContext.request.contextPath}employee?method=editLog&id=${log.id}"><input type="button" class="tab_button" value="修改"/></a>
                                              <a href="${pageContext.request.contextPath}employee?method=deleteLog&id=${log.id}" onclick="javaScripte:return del()"><input type="button" class="tab_button" value="删除"/></a></td>
                </tr>
                </c:forEach>
            </table>
            <form action="#" class="tab_form">

                <a href="${pageContext.request.contextPath}employee?method=selectCondition&page=${allPage}&logFamily=${logFamily}&logStatus=${logStatus}"><input type="button" class="table_button fyh" value="尾页" /></a>
                <a href="${pageContext.request.contextPath}employee?method=selectCondition&page=${pageNow+1}&logFamily=${logFamily}&logStatus=${logStatus}"><input type="button" class="table_button fyh" value="下一页" /></a>
                <a href="${pageContext.request.contextPath}employee?method=selectCondition&page=${pageNow-1}&logFamily=${logFamily}&logStatus=${logStatus}"><input type="button" class="table_button fyh" value="上一页" /></a>
                <a href="${pageContext.request.contextPath}employee?method=selectCondition&page=0&logFamily=${logFamily}&logStatus=${logStatus}"><input type="button" class="table_button fyh" value="首页" /></a>
                <div class=" table_page fyh">
                    共&nbsp;<span>${count}</span>&nbsp;条记录&nbsp;&nbsp;&nbsp;&nbsp;
                    每页&nbsp;<span>10</span>&nbsp;条&nbsp;&nbsp;&nbsp;&nbsp;
                    页次：<input type="text" value="${pageNow}" class="table_pgnum"/>共${allPage}&nbsp;&nbsp;页
                </div>
            </form>
        </div>
    </div>
    <div class="floor fyh">软件开发：&nbsp;赣州科睿特软件技术有限公司(技术支持)&nbsp;&nbsp;&nbsp;&nbsp;客服电话：&nbsp;0797-8356742</div>
</div>
</body>
</html>

